package edu.umuc.cmsc495_final_project;

import java.io.Serializable;

public class Table implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -894036686209046970L;
	private TableType tableType;
	private boolean tableTaken;
	private int tableID;
	private DinnerEvent dinnerEvent;
	private patron seatedHere;
	
	public Table(int tableID, TableType tableType, DinnerEvent dinnerEvent) {
		this.setTableID(tableID);
		this.setTableType(tableType);
		this.setDinnerEvent(dinnerEvent);
	}

	public void setDinnerEvent(DinnerEvent dinnerEvent) {
		this.dinnerEvent = dinnerEvent;
	}
	
	public DinnerEvent getDinnerEvent(){
		return dinnerEvent;
	}

	public boolean isTableTaken() {
		return tableTaken;
	}

	public void setTableTaken(boolean tableTaken) {
		this.tableTaken = tableTaken;
	}

	public int getTableID() {
		return tableID;
	}

	public void setTableID(int tableID) {
		this.tableID = tableID;
	}

	public TableType getTableType() {
		return tableType;
	}

	public void setTableType(TableType tableType) {
		this.tableType = tableType;
	}
	
	public String toString(){
		return "Table " + tableID + " is occupied: " + tableTaken +  ", and is of type: " + tableType;
	}

	public patron getWhosSeatedHere() {
		return seatedHere;
	}

	public void setWhosSeatedHere(patron seatedHere) {
		this.seatedHere = seatedHere;
	}
}
